// Inline function: A optimization strategy of compiler.

#include <iostream>
using namespace std;


void foo( int x ) {
	cout << "foo( int ) : " << x << endl;
}


// Inline function
// 	It can turn the function into binary to replace the function which call it.
//	It have some shortcoming
//		such as it will make the size of the file and the memory of the process code larger.
//		Only functions that are small and frequently called are suitable for inline functions.
//	The inline keyword simply suggests that the compiler make it an inline function
//	Recursive function are't suitable to be a inline function
inline void bar( int x ) {
	cout << "bar( int ) : " << x << endl;
}


int main( void ) {
	
	foo( 10 );
	bar( 10 );		// This is a inline function

	
	return 0;
}

